class Container:
    """依赖注入容器"""
    def __init__(self):
        self._services = {}
        self._controllers = {}
    
    def register_service(self, name, service):
        """注册服务"""
        self._services[name] = service
    
    def get_service(self, name):
        """获取服务"""
        return self._services.get(name)
    
    def register_controller(self, name, controller):
        """注册控制器"""
        self._controllers[name] = controller
    
    def get_controller(self, name):
        """获取控制器"""
        return self._controllers.get(name)
    
    @property
    def services(self):
        """获取所有服务"""
        return self._services
    
    @property
    def controllers(self):
        """获取所有控制器"""
        return self._controllers